import React from 'react';
import './Modal.css';

const Modal = ({ isOpen, onClose, children, onButtonClick }) => {
    if (!isOpen) return null;

    return (
        <div className="modal-overlay" onClick={onClose}>
            <div className="modal-content" onClick={(e) => e.stopPropagation()}>
                {children}
            </div>

            <div className='modal-buttom' onClick={onButtonClick}>我来猜</div>

            <div className='buttom-area'>
                <div className='buttom-text'>查看我的年度账单</div>
                <div className='text-line'></div>
            </div>
        </div>
    );
};

export default Modal;
